I think the most common use case for a feature like this would be handling a shader differently depending on whether it is used for 2D or 3D drawing. You can already do that with the shader authoring UI by defining a shader as special/non-special depending on the projection matrix (provided the matrix can be evaluated properly which isn’t always the case). If I had to guess, I’d say that covers about 80% of potential uses cases for a feature like this.
However, the way this is implemented allows to theoretically add any number of arbitrary switch conditions, including button states (or the current moon phase ;)), mainly meant for coding game specific conditions if necessary. I’ll keep adding more general, UI exposed switch conditions in mind. IMO that only really makes sense without the need for user interaction though.