How to create a variation switch in a product query?

Hi! Is it possible to, instead of a “Select options” button, to add a select field to choose the variation, and add that to the cart, instead of bringing us to the single product template?