> For the complete documentation index, see [llms.txt](https://docs.cascade.io/cascade/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cascade.io/cascade/functions-and-expressions/functions/logical/switch.md).

# SWITCH

SWITCH( `key`, `value1,` `returnValue1`, \[`value2`, `returnValue2`...] )

Returns the `returnValue` for any `value` that matches `key`

### Arguments

| Argument                       | Description                                     |
| ------------------------------ | ----------------------------------------------- |
| `key`                          | Key to find among key:value pairs               |
| `value1`                       | Value(s) to check for `key` value match         |
| `returnValue1`                 | Value to return if `value1` is matched by `key` |
| \[`value2`, `returnValue2`...] | Additional key:value pairs                      |

### Output

Outputs corresponding `returnValue` for `value` that matches `key`

### Examples

```
SWITCH(2, 1, "Monday", 2, "Tuesday", 3, "Wednesday", 4, "Thursday")
>> "Tuesday"
```
