Propensity score matching is a robust method to infer causal relationships in observational studies with two treatment arms. Few matching algorithms, however, have been proposed for designs with more than two groups. We fill the gap with a three-way conditionally optimal matching algorithm, whose result is proved to be bounded away from the optimal solution by a known constant. Simulations show that our algorithm outperforms the nearest neighbor algorithm. We apply our method to the Nationwide Emergency Department Sample data to compare mortality among non-trauma, level I and level II trauma centers. We illustrate an implementation of Rosenbaum's framework of evidence factors for binary outcomes, which can be used to conduct an outcome analysis and a sensitivity analysis for hidden bias on three-group matched designs. We find strong evidence that the admission to a trauma center has a beneficial effect on the outcome. The sensitivity analysis shows that unmeasured confounders moderately associated with the type of care received may change the result qualitatively. Finally, we discuss a generalization of our methodology to designs with more than three treatment groups.