Refactor switch statement for selecting responses