Value decoding in InfluxDB queries

Is there a way to decode measurement values when querying InfluxDB?
For example, I would like to decode priority values - 0 => debug, 1 => info, 2 => warning, 3 => error, 4 => fatal.
At the moment I save the decoded value alongside the key, which does not seem like a good practice…
Something along the lines of Oracle’s DECODE function (DECODE) or CASE WHEN.

Bump - still looking for a way to do this.