Wh- clauses vs Relative clauses
In a comment, John Lawler wrote:
These are called either headless relative clauses or embedded question clauses. They are noun clauses, in that they are clauses with subjects and verbs that act like nouns. Typically they are the subject or object of appropriate predicates: What he did was unforgivable or I really liked what he did. They can refer either to the presupposed answer to the question (What he did next was quite surprising -- these are known as Conjunctive wh-clauses), or to an indefinite answer to the question (What he did next is completely unknown -- these are known as Disjunctive wh-clauses).