can even be smaller, and yes it uses an hidded variable ...
#define STRSWITCH(STR) char _x[16]; strcpy(_x, STR); if (false)
#define STRCASE(STR) } else if (strcmp(_x, STR)==0){
#define STRDEFAULT } else {
void setup()
{
Serial.begin(9600);
char x[10];
strcpy(x, "BEER");
STRSWITCH(x)
{
STRCASE ("NOT")
Serial.println(1,DEC);
Serial.println(1,DEC);
STRCASE ("APE")
Serial.println(2,DEC);
Serial.println(2,DEC);
STRCASE ("BEER")
Serial.println(3,DEC);
STRCASE ("WINE")
Serial.println(4,DEC);
STRDEFAULT
Serial.println("not in the list");
}
}
void loop(){
};