It was narrated that Thabit bin Ad-Dahhak said: The Messenger of Allah (ﷺ) said: 'Whoever takes an oath to follow a religion other than Islam, telling a deliberate lie, he will be as he said.'
It was narrated from Anas that the Messenger of Allah (ﷺ) heard a man say: If that happens, I will be a Jew. The Messenger of Allah (ﷺ) said: 'That is guaranteed.
It was narrated from Abdullah bin Buraidah that his father told that : the Messenger of Allah (ﷺ) said: Whoever says: 'I have nothing to do with Islam,' if he is lying then he is as he said, and if he is telling the truth, his Islam will not be sound.