By looking into Grafana's template code for Prometheus in grafana/public/app/plugins/datasource/prometheus/metric_find_query.ts you can see that they do not use PromQL, but visit certain endponts to the get the label values, so for label_values(instance)
the URL would be something like this:
http://localhost:9090/api/v1/label/instance/values
This one however returns all labels called instance
from every metric in the TSDB. If the label is unique for one particular metric, then you have your answer. Otherwise the template code for something like label_values(up, instance)
it is slightly more complicated and it seems like it actually downloads the whole series for the metric from:
http://localhost:9090/api/v1/series?match[]=up
also adding time range parameters start
and end
which I omitted for clarity, then finds the label values by parsing the JSON output.
I would also like to do the same in PromQL, but I have not figured out whether it is possible or not.