How to access value from custom key:value variable

I have a variable called MaxName which has custom values like this:

1: ‘this’, 2: ‘that’

I want to select the values based on another variable called Level, which has values like this:

1, 2

How can I achieve this?

The most promising thing I’ve tried: ${MaxName:$Level}
This just returns all key-value pairs from MaxName in glob format.