“I'm not sure what the right way is”
Direct and indirect questions are not usually the same:
What is your name?
I don't know what your name is.
But sometimes, they become the same:
What is wrong with you?
I don't know what is wrong with you.
What is available?
I like to know what is available.
So my question is, what the grammatical rule is when they become the same.