It depends on how confrontational you want to be.
You could just stare at them.
You could ask them why they would ask such a personal question.
Less confrontationally, you could say “Don’t worry about it.”
If they persist, you can say”Just don’t worry about it.” If they still persist you can stare.
If someone is consistently harassing you at work, you can ask your supervisor for help in getting them to stop.