Convert the Column value to Row in SQL Query using SP

This should help you