Prometheus query for table in grafana

When i make a table panel and go to “Options” tab, columns parameter set to Auto: Columns and their order are determined by the data query.

Is there a doc on how write prometheus queries for grafana tables?

My prometheus data is a metric with 2 labels my_col and my_row :

my_metric{my_col="1",my_row="A"} 6
my_metric{my_col="2",my_row="A"} 8
my_metric{my_col="1",my_row="B"} 10
my_metric{my_col="2",my_row="B"} 17

I want to make a table that looks like:

|   | 1 | 2 |
| A | 6 | 8 |
| B | 10| 17|

Any tips on how to do that would be appreciated