Sort data query results by options from the select component

I am trying to sort a list pulled from backend based on the value of a select component. But when I use a value of the select as a dynamic value in the query, the query result is not sorted. I believe the issue is that the dynamic value from select is a string, while in the query I need to place a table’s column name, without parenthesis.

Can anyone guide me how to easily turn a string into a column name in the query?

Thank you in advance.

Hi, it seems that we have some limitations currently for our custom sql operation, we will be looking into improving it.