I had a similar experience during an interview of mine. (I have managed to crack it, so I thought my experience might be useful to you.)
I am from a non-CS background and I am interviewing for a Data Science Engineer position (which involves building the analytics architecture)
So, this was my response to the question:
My passion always was to become a data science engineer. Although I
come from a non-CS background, I have taken the help of online
resources and courses to work my way through the concepts. And as it
is my dream to become one, I am positive that I would learn the
concepts very fast, and get going with the team quickly.
This answer is only valid if you have put enough efforts for your desired career, and have a convincing reason behind the change.
Else, prove your CS skills through any projects you have done as part of your coursework(if any).
Telling the interviewer that you want to make the switch just because there are nice opportunities in CS, wouldn't help(<-- This also comes from an interview experience of a friend).