How to check select event

How to check select event

I have two options select, if I want to change option 1 to option 2, I want to show confirm message let user check, if no then keep on 1, if yes then change to 2, how to do that?