Alias for metric column with Postgres data source

What’s the cleanest way to have Grafana lookup an alias name for metrics if I use Postgres data source?

For example, if I have 3 columns: time, metric, value. Then, currently I use text for the metric column, but it’s needlessly repeated. Instead I would rather use an int, but then I have no easy way to tell Grafana to lookup the string version of that int from a lookup table.

Is there a good solution for this?