Support 3 or 4 tests
There are a couple simple approaches using the Lookup Function or the Eval Function that should be easy to understand and maintain.
Example 1: The Lookup Function
Under Knowledge Lookups, create a Lookup Table
Add a Lookup Function (Advanced Settings Ignore Case)
Example 2: The Eval Function
The syntax of /^IN$/i.test(direction) is a case insensitive (i) regular expression that tests for a match in the field direction. The ^ and $ represent the beginning and end of the value. The first line of the evan ensures that a direction field is not created if direction is not defined.