I'd like to create a column of values based on whether a certain string appears in another field.
In the example below I'd like to return a value of 'SEVENTH' if the value in the code column contains '_7', 'FIRST' if it contains '_1' and 'SECOND' if it contains '_2'
| code | NEW COLUMN |
| 3117_CORE_7099 | SEVENTH |
| 3007_CORE_1099 | FIRST |
| 1457_COMP_2099 | SECOND |
I'm not make any progress with this at the moment. Can anyone help?
Thank you in advance.
Best,
DHB