Conformation of a Comb-like Chain Free in Solution and Confined in a Nanochannel: From Linear to Bottlebrush Structure