The most famous guitar interpolation of Beethoven's "Ode to Joy" (Symphony No. 9 finale) is in Jimi Hendrix's live performances of "Voodoo Child (Slight Return)"—not a studio track. He'd quote the melody in the upper register during extended outros (e.g., Woodstock 1969, Isle of Wight 1970).
Other notable uses:
Clarification: Bob Dylan's "All Along the Watchtower" (especially Hendrix's cover) does not quote "Ode to Joy." The confusion may stem from Hendrix's habit of weaving hymns and anthems into improvisations.
If you heard it in a specific recorded solo, note the artist/album—I can pinpoint the exact moment.