EXL Service interview question

Sql stats case based excel