Can I have datasource as a variable in grafana

I need to update datasource like we have variables.
How to do that