A total of four people had to be freed from their cars following a crash in Bradford.