Get value of webform select option

I’m writing some custom code and I need to translate the selected option from a webform submission on a select component to the nice value.

For example my select options are something like:
test|This is a test
demo|This is a demo
real|This is real

When I look at the webform submission the value for the component is understandably “demo” not “This is a demo”. Is there any functions I can use to do this translation or do I need to do my own processing of the webform component options.

I can’t seem to find anything obvious in the documentation or the code….but you know…”wood for the trees” and all that!


Drupal version: