EPAM Systems interview question

Write a SQL query on a condition based ?