Is there anyway to write a switch statement in FQL for UDF?

Dang, it made me changed quite a bit of code. I’ll use it again then!

A quick example to validate that it does work:

Query(
  Lambda('x', 
    Let([
        { case: null },
        { case: If(Equals(Var('x'), 0), 0, Var('case')) }, 
        { case: If(Equals(Var('x'), 1), 1, Var('case')) }, 
        { case: If(Equals(Var('x'), 2), 2, Var('case')) }
      ], 
      Var('case')
    )
  )
)