Sunan Ibn Majah, Book 11, Hadith 2183 (In-Book)

It was narrated from Ibn 'Umar that the Messenger of Allah said: "Whoever swears an oath and says In sha' Allah, if he wishes he may go ahead and if he wishes he may not, without having broken his oath."

حَدَّثَنَا مُحَمَّدُ بْنُ زِيَادٍ، حَدَّثَنَا عَبْدُ الْوَارِثِ بْنُ سَعِيدٍ، عَنْ أَيُّوبَ، عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ، قَالَ قَالَ رَسُولُ اللَّهِ ـ صلى الله عليه وسلم ـ ‏ "‏ مَنْ حَلَفَ وَاسْتَثْنَى إِنْ شَاءَ رَجَعَ وَإِنْ شَاءَ تَرَكَ غَيْرُ حَانِثٍ ‏" ‏ ‏.‏

sunnah.com