An indirect question never takes a question mark. (Chicago 16, 6.52)
He wondered whether it was worth the risk.
Indirect one-word question
When a question within a sentence consists of a single word, such as “who,” “when,” “how,” or “why,” a question mark may be omitted, and the word is sometimes italicized. (Chicago 16, 6.68)
She asked herself why.
The question was no longer how but when.
Comma with questions
A direct question included within another sentence is usually introduced by a comma. A direct question may take an initial capital letter if it is relatively long or has internal punctuation.
He asked himself, where am I headed?
The question on everyone's mind was, how are we going to tell her?
Legislators had to be asking themselves, Can the fund be used for the current emergency, or must it remain dedicated to its original purpose?
If the result seems awkward, rephrase as an indrect question. An indirect question may take an initial capital letter if it is relatively long or has initial punctuation. (Chicago 16, 6.52)
He asked himself where he was headed.
The question of how to tell her was on everyone's mind.
Ursula wondered why her watch had stopped ticking.
Where to find a reliable clock is the question of the hour.
Exclamation rather then question
A sentence in the form of a direct question can often be styled as an exclamation simply by using an exclamation point rather than a question mark. (Chicago 16, 6.72)
How could you possibly believe that!
When will I ever learn!