Differently is used as an adverb. In this case you're describing the action/verb that was different.
I agree that it would be fine as part of dialogue, since it's more common for people to ask the fist question than the second.
It could also work if you worded it: "What did you do that was different?"