switch -> if..elseif

Signed-off-by: Chirayu Chiripal <chirayu.chiripal@gmail.com>