The question can be split into 2 parts:
- Did he compare Israel to apartheid as an analogy?
- Did he directly accuse Israel of the crime of apartheid?
Currently, the only mention of "Nelson Mandela" in the wikipedia article Israel and the apartheid analogy is that his former counsel disagrees with the analogy/accusation.
I saw the claim most recently in a comment on a Reddit thread about "Alexandria Ocasio-Cortez calling Israel an apartheid state" which stated, "As did Nelson Mandela" and received over 1.9k upvotes.