How to map dashboard variable value to some other value

Hello. I have encountered following problem that I don’t know how to solve.

Let’s assume I have dashboard with environment names variable

$Environment: prod,demo

It works perfect for visualisations that use queries my.server.$Environment.

problem is that in some other series environment is called slightly different

like in such map:
prodproduction
demopreprod

What I would like to achieve is to be able to use $Environment variable so that for some visualisation that I would use in queries

my.server.$Environment.rest_of_the_graphite_query for getting series with “left value”(prod, demo)
other.server.<some “magic” upon $Environment variable>.rest_of_the_graphite_query for getting series with “right value” (production, preprod)

To explain in pictures:
what I have:
what I have
what I want:
what I want

Is it possible in some way?