Variable key value regex, using Grafana interpolates in dashboard

I am trying to use the value returned by my query as key value
This is the regex i used

But this is only returning the first row only cutting out rest of the rows returned by the query used in the variable

And i have used the variable in my dashboard now, premium is the variable name
When I directly use the variable in panel title it gave the text ${premium}
And When i added it with value ${premium:value} it gave the variable value correctly. Bu then whatever i type after semicolon it returns only value.

But in my case i want to use the percentencode to get the data from data source
so, i want to use two interpolates How do i do that.
And my regex why its not returning all the key value but only returns one row.
/(?.)|(?.)/g whatever comes after the | its is value before that its text. Please check.
image

Please share a raw list of the values before applying the regex

Hi @yosiasz
This can be taken as the example for the input

Then how can we display it as text and value, like premium can a the variable name
then ${premium:text} or ${premium:value} this is could not be achieved even with regex
also i am using an api call to get some data so, i have used
${premium:percentencode} so along with this any way we can do
${premium.text:percentencode} something like this

So if this was a data that leverages SQL it would be

Select text as __text, value as __value

Then you refer to it as you stated above

${premium:text}
${premium:value}

Hi @yosiasz
Updated the query
my actual query will process

But grafana variable is processing the first column only that’s okay

but still could not print the second column with the
${premium:text} → prints text value
${premium:value} → again prints text value

I think this is the issue, out __value first