Selecting optimal treatment in clinical trials using covariate information