Right characters but wrong scene. This is not the scene where Claude Rains tells Humphrey Bogart that he’s shocked to find gambling in the cafe. That happened inside the cafe.
This scene takes place outdoors and it goes like this:
Captain Renault: I’ve often speculated why you don’t return to America. Did you abscond with the church funds? Run off with a senator’s wife? I like to think you killed a man. It’s the Romantic in me.
Rick: It was a combination of all three.