case / when
Compares a value against multiple options.
Syntax
case value when x then ... else ... end
Description
A readable way for multi-branch control (like switch). break is not needed.
Example
Loading editor…
Expected output
Tue
When to use?
Menu, state control.