The 25-year-old is a reported transfer target for Real following City's two-year ban from European football for breaching Financial Fair Play rules.
Sterling has been linked with a move to the Bernabeu in the past but he is contracted to City until 2023 and would command a hefty fee.
In a new interview with Spanish outlet AS, Sterling was asked if he would one day like to play for Madrid and responded: "How do I answer that one? Is the camera live or is it just taking pictures?
"No one knows what the future will hold. I am a player and I am always open to challenges but right now my challenge is at City and I'm really happy. I have a contract with City now and I have to respect this.
"Real Madrid are a fantastic club. When you see the white shirt you know exactly what the club stands for, it's massive."
Asked about speculation linking him with a move to the Bernabeu, Sterling said: "It's something that you see all the time, but I'm a City player and I'm enjoying it at the moment, even if things haven't gone quite planned in the league. We now have a massive opportunity in the Champions League."
City play Real Madrid in the last 16 of the Champions League, with the first leg at the Bernabeu on Wednesday and the return game at Etihad Stadium on 17 March.
Sterling is facing a race to be fit in time for the tie after suffering a hamstring injury against Tottenham at the beginning of February.