What about a CASE function?

I find pretty complicate handling the response to several values of a variable using nested if/then/else.

A "CASE" function would be much easier to use.

The "if" now can be already used in a switch mode, so $if(

a = 1, "do something if a is one",

a = 2, "do something if a is two",

"do something is none of the above"

)