case
statements need constants. You could accomplish something similar to what you're doing with a macro.
#define TEN 10
#include
int main()
{
int const x = TEN;
int y = 20;
switch(y)
{
case TEN: //error: case label does not reduce to an integer constant
printf("value of x: %d\n",x);
break;
}
}