how to show element as respond to user dropdown selection

Hi everybody
I try to write a code that will show the user an element in response to his answer at the dropdown input.
for example: if the user entered in the drop-down answer number 1
the site will show him a certain element
and if the user entered the dropdown answer number 2
the site will show him another element …

I would be very happy if someone could post here an example of style code so I can use it / learn how the idea should be

Thank you!

Make the elements hidden on load and do something like:

$w.onReady(() => {
    $w('#dropdown1').onChange(event => {
    switch (event.target.value){ 
        case '1':
            $w('#elementX').show();
            break;
        case '2':
            $w('#elementY').show();
            break;
        case '3':
            $w('#elementZ').show();
            break;
        //etc...
       }
    })
})