You can follow this detailed document on how to to execute different query with custom variable value