In such situations I generally ask why they want to know. Sometime in the last six months I remember someone at a passport check desk at Heathrow asked me the normal run of security questions, and then followed up with something I hadn't been asked before (I forget what), and before answering, I asked her, "Is this part of the security routine or are we just chatting now?" Of course, technically you should always assume that anything you say in those circumstances may be noted, but it still seemed worth asking. She said it was just chatting, I answered her question and the conversation ended pleasantly.
wg