Show series based on value of custom variable

Using Grafana 5.2.2 and InfluxDB, how can I selectively show certain series in a graph based on the value of a custom variable (toggle on top of the dashboard)?

Is this possible to do?