You can but after you resign, you can not enter QATAR for next two year and only option to switch your job is to get the No Objection letter from your existing sponsor :) But why you want to leave?