How to make a reverse "switch on enum" macro?

Thanks! This is precisely what I want yes, however this code isn’t quite working I believe.

I’m not very good with C++, could you give it a look?