I don’t think it can. You’d need the witness to testify or sign an affidavit and submit it as evidence. But there’s a lot of particulars about evidence so I think depends on how they said it.
Have you ever watched a criminal trial? Some of them are streamed online now. Seriously go watch them, you often get career lawyers commenting on them too, for free.
What someone said publicly can definitely be used and has been used criminal trials.