What you just worked with are
embedded questions (verbs+WH-clauses).
Words such as who, when, where and why are not always used to ask questions.
They are often found as part of a statement.
In these cases they are not followed by the question word order.
> I can't remember where I heard that song before.
NOT: I can't remember where did I hear that song before.