In Time Tec Interview Question

SQL queries, program to print if and else statement both