Is multiform variable possible?

I need to use variable v1 which contains the same type of information : a place, a location. For some types of location, its value can be numeric, and alphanumeric for others.
The interest is to offer a single drop-down list for all locations.
I use a second variable v2 , alphanumeric, used in the dashboard’s query, which is the result of a mysql query which is based on the value of v1 : ideally, the mysql query does not use the same table if v1 is numeric or alphanumeric …

I wonder if other people have had this need …

can you please provide sample data of what this would look like?