Tough question to answer because there are so many different scenarios where one may be better than the other. It is also possible that a 10X could have MORE effective zoom than a 20X, depending on the mm value of the lens. The higher the mm number, the closer zoomed in the picture will be....A wide-view lens (say 2.8mm) with 20X zoom will be 56mm zoomed in all the way to 20X; whereas a 10X lens that starts more zoomed in (say a starting point of 6mm) will be at 60mm when zoomed in all the way at 10X...Always important to check the mm range to see just how much zoom you're getting and to confirm that you'll be able to see everything you want to see when fully zoomed out.
If you have a wide area that you want to be able to cover at the same time, then you would probably want the one with the lowest mm starting point. If a wide angle of view is not important and most of what you want to see is far away, the one that ends in the highest mm zoomed in would be the best. If everything that you need to see would fall within the ranges of either lens, then the higher megapixel sensor would likely be the best....But even that can be subjective to the image processing chip as some here have stated that the Huisun 2mp cams with newer model processing chips gives a clearer/sharper image than Hikvision 4mp cams. Also lower megapixel sensors tend to perform better in low light. If low light night video is what you're aiming at, a 1mp cam that can produce a clean image with little noise would be better than a 12mp cam with extreme noise.
It really is a case to where the best answer would depend on all specs being completely equal and your specific situation.