Yao's Millionaires' Problem without knowledge of plaintext
What you are asking for is impossible, because it would immediately break the cryptosystem.

Let's assume for a moment, that such a function exists and we know how it works. And we get a challenge ciphertext $c = enc(x)$. We know the public key, because it's public. And if we assume the set of messages to be $0,1,\dots,1000$, we then just encrypt $500$ and then apply the function to get $x \geq 500$. If it is true, we apply the algorithm to $c$ and $enc(750)$ and otherwise to $c$ and $enc(250)$. This is just a binary search, and this way we can efficiently find out what $x$ is - without knowing the decryption key. And that would mean, there is no security at all.