Switch to If statement

This is a part of my program, that queries the user If they want to see the process of sorting numbers in order of highest to lowest. The program works but the code is repetitive. I was informed that it is possible to change it into a switch statement. But I can not figure out how.