From Sahih Bukhari (Hadith 2879):
Narrated `Aisha:Whenever the Prophet (ﷺ) intended to proceed on a journey, he used to draw lots amongst his wives and would take the one upon whom the lot fell. Once, before setting out for Jihad, he drew lots amongst us and the lot came to me; so I went with the Prophet; and that happened after the revelation of the Verse of Hijab (i.e. veiling)
Reference: Bukhari 2879