To be fairly honest, a question such as this is quite specific to a person or an individual. A Visa official is usually just trying to verify your intent but I understand you anxiety. So here's a sample answer I would have given.
Question - Why are you changing your stream?
Answer - Before I started with my undergraduate degree, I felt that I was interested in Electrical and Electronics Engineering. After spending some time in the stream and interacting with my fellow peers, I realized that I was better suited in the field of Computer Science. On consulting with my advisers at university, I decided that I could pursue my dreams by completing my Undergrad as an Electrical and Electronics student and then pursue my Graduate degree in the field of Computer Science.
The best answer to this question can be given by you yourself. And always remember that it's not as bad as it is portrayed to be many times.