My lawyer told me he has to bring what I said u in court,isn't that against lawyer-client confidentiality
That's impossible to answer for certain without details. A question like this is very fact-specific and can't be answered with so little information.