Sql output from two columns

Same answer as your previous question: