Modify String for switch to ordinal if-else statement