Which pill is right?

Can you take a blood test to figure out which pill is right for you? Or is it just trial and error?