Narrated Abu Hurairah (RA):
Allah's Messenger (ﷺ) said: "Your oath will be about that matter which your adversary has required you to swear about so that he will believe you."In another narration: "An oath is to be interpreted according to the intention of the one who requested it (Al-Mustahlif)."[Muslim reported both narrations].
Reference: Bulugh al-Maram 1376
In-book reference: Book 13, Hadith 3
English translation: Book 13, Hadith 1376