Convert Query Result to String Representation (like Switch-Case)

I’m using Grafana, but I’m OK with a solution in Influx’s query language. I’m trying to set up a panel to display a value based on a result of a query. I’m querying charge states for charge controllers, and I need to convert the integer value in the database into human-readable strings, and I’d rather not introduce that much more data into the database to be putting the string into it instead of the integer value.