You need to be minimum two years with one sponsor to transfer to another. In some cases, one year may do.

If your current employer agrees to release you, then without any other formalities like NOC etc , you can easily transfer.

If your current employer does not allow you to release rather agrees to send you back home and issue you NOC (No Objection Certificate) and your new employer has new visa for you, then you can return to Qatar even after one day of departure.

If you current employer does not allow you to release and dont agree to issue a NOC, then only choice is to leave Qatar and you will be able to return after two years if new employer still have visa and job offer.

Hope it is clear, if more details required feel free to comment or inbox.