You do it with a series of subtractions and tests.
I'm presuming you are talking about the 4 bit A2D result you asked about in another thread, if so there's an easier and faster way to do it.
As you have only 16 possible results (with 4 bits) you could use a jump table. This works exactly like a lookup table, except instead of RETLW lines it uses GOTO's instead.