Which of the following sentences is punctuated correctly?

A: Mary asked, how much the puppy cost.
B: Mary asked how much the puppy cost.
C: Mary asked, “how much the puppy cost?”
D: Mary asked, how much the puppy cost?