Hey @pinchu ,
Welcome to the community forum !!
You’d need to use templating in your alerts.
I wrote a beginner’s article on this. Hope it helps.
There’s also another guide on this forum from Grafana Team member. You can refer that as well Here.