Grouping targets from prometheus datasource

Hello! I have about 100 targets and my data source is “prometheus”. All my targets are defined under a single “job”. How can I group my targets with a “variable/dropdownlist” that I set with Grafana.

For example, I want to show the targets in a table, I want to list the targets according to the groups I created in the variable section. A target can belong to more than one group.

Targets: Apple, Banana, Carrot, Fish, Strawberry, Olive, Egg, Orange, Fig

Basket-1: Apple, Fish, Orange, Egg
Basket-2: Banana,Fish,Olive
Basket-3: Banana,Carrot,Fish,Olive,Strawberry
Basket-4: Egg,Orange

I would like to create “Basket-x” variables in Grafana to list my pre-defined targets.

Grafana version: 9.1.5

Thanks.