The reason that it is often left as a hanging sentence is that the second half of the sentence varies based on the context.
Other than what has already been mentioned by others, some complete sentences that come to mind, "If you have to ask, then I'm not going to tell you," and "If you have to ask, then the answer is 'no.'" "If you have to ask, then the answer is 'yes.'"
It always means, "By asking the question, you've answered the question."
For example, "Do these pants make my butt look fat?" If you have to ask...
...then you already know that your butt looks fat in those pants.