EPAM Systems Interview Question

Write a SQL query on a condition based ?