Using variables to turn off queries

I am using MSSQL and have a panel with 5 queries graphed. I would like to have a dropdown at the top that allows me to pick which things I want graphed. I can’t find an example of this being done with SQL. I know I can click on the lines in the legend, but I have several similar panels on the dashboard and would like to do it using the variable drop down. What is the best way to accomplish this?

Please read this:

I have read that, and I apologize for my confusion but I am having a hard time understanding how to use this to turn off a query? The examples show options that are not visible in my queries. I think this is because I am using MSSQ and the examples are in other databases.

I have the variable at the top, but how do I use this to turn off or turn on queries?

Hi, I’m also interested by doing this, does anyone knows how to do this ?

Where do you get the variable from the database or other sources?
After you can get the variable value, you can use it as drop down