It is narrated from Sayyiduna Ibn Umar (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) said: "The example of a hypocrite is like that of a goat between two flocks; sometimes it goes to one flock and sometimes to the other, and it does not know to which flock it belongs."
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 5079