> ## Documentation Index
> Fetch the complete documentation index at: https://learn.workflow.dog/llms.txt
> Use this file to discover all available pages before exploring further.

# Choose Value by Case

> Map an exact text match to a corresponding output value.

**Choose Value by Case** compares text against a set of named cases and returns
the value belonging to the matching case.

## Inputs

| Input          | Type              | Required | Description                                        |
| -------------- | ----------------- | -------- | -------------------------------------------------- |
| **Test Value** | String            | Yes      | Text to look up.                                   |
| **Cases**      | Repeatable object | Yes      | One or more **Case** and **Value** pairs.          |
| **Default**    | Any               | No       | Returned when no case matches. Defaults to `null`. |

Each **Case** is a string key. Matching is exact and case-sensitive.

## Output

| Output     | Type | Description                              |
| ---------- | ---- | ---------------------------------------- |
| **Result** | Any  | The matching case value, or **Default**. |

For example, cases `urgent → page`, `normal → queue` and a test value of
`urgent` return `page`.

<Tip>
  This action chooses a value. To send one value to separate workflow branches,
  use **Route Value** after producing a Boolean condition.
</Tip>
