... case 1: string x = \"SomeString\"; ... break; case 2: x = \"SomeOtherString\"; ... break; ...
Is there something that
move the string declaration to before the
switch(value)
statement. Then assign x for each case.