Sunan Ibn Majah, Volume 3, Book 11, Hadith 2099 (DarusSalam) ⓘ
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."
حَدَّثَنَا هِشَامُ بْنُ عَمَّارٍ، حَدَّثَنَا بَقِيَّةُ، عَنْ عَبْدِ اللَّهِ بْنِ مُحَرَّرٍ، عَنْ قَتَادَةَ، عَنْ أَنَسٍ، قَالَ سَمِعَ النَّبِيُّ ـ صلى الله عليه وسلم ـ رَجُلاً يَقُولُ أَنَا إِذًا لَيَهُودِيٌّ . فَقَالَ رَسُولُ اللَّهِ ـ صلى الله عليه وسلم ـ " وَجَبَتْ " .
also referenced under: Hadith 2099 (Reference) & Book 11, Hadith 2177 (In-Book)