Use a structure variable to store the number as the key and it’s text equivalent as the value. Then use VariableString(structureName[VariableString(type)]) (where type is the variable you mentioned in your post).
So I played around with this and still can’t get it to work with an object’s variables.
For example a monster type will have a type variable, than sub variables as structure variables, but still can’t get the text to callback to the specific type.