Conor McGregor will take on Nate Diaz in a non-title fight at UFC 196 after Rafael dos Anjos dropped out with an injury.