Cognizant Interview Question

Was asked to write few Oracle SQL queries like to convert rows into columns and vice versa.