How to make a dropdown inside another form

I need to design a form in which a field is a dropdown with several options and within each option there is another dropdown with options. For example, I have the Segment field with the Comsuption and Finance options and I need the user when they choose Consumtion to see the Agribusiness and Comercial Center options. How can I do this in a form?