which selects; what identifies. That said, people interchange them quite readily.
I'd use which if there were a short list to select from; otherwise, what.
Point blank: What are your favorite foods?
Primed: We have cake, cookies, and ice cream. Which would you like?
CJ