Trials are public in the United States and as such, all information is available for public review by anyone who seeks it. 4th Amendment Protections do not protect evidence in "plain view" or where the individual can reasonably not expect privacy under ordinary circumstances.
Furthermore, since copies of depositions are given to both sides in a civil suit, without a gag order, there is nothing preventing the plaintiff from discussing evidence with anyone they see fit, including police. This is again, not a violation of fourth amendment, as the Police did not "search" anything of Cosby's but were given evidence by a witness to a potential crime.
While not familiar with the timeline of events, the civil case preceded the criminal case, so the possibility of it being used as evidence against him in the criminal case was not yet there. They have the legal force of sworn testimony so 5th amendment rights attach, but so do perjury charges if a statement is made. Under Civil Proceedings, a lower burden of proof is needed to secure a victory for the plaintiff, so Cosby pleading to the 5th about his use of Quaaludes would make him look just as guilty (if not more so... what does he have to hide that could be criminal?) than if he just testifies that he did use them. Lying about them while under oath is a crime if evidence is found prove that he was lying.