Hello JulS
Both is possible:
You can buy tickets for two parts of the trip: Schwerzenbach-Basel SBB and Basel SBB to Colmar. For the first segment, you can purchase an adult ticket, while your child will be travelling under the Swiss Family Card. For the second segment, it is necessary to purchase two tickets, one for you and one for your child.
Or, you can buy a ticket Schwerzenbach to Colmar, and declare the Co-Travel Card for your child. By doing so, the ticketing system will only charge a ticket for your child for the segment Basel-SBB to Colmar.
A personal tip that has nothing to do with the ticket: beware of pickpockets in Colmar, they are numerous there, especially during the Christmas market. It is a beautiful city and worth a visit, just keep your bags closed at all times and carry your wallet and passport under your clothes. You would not be the first one to be a victim.
Happy travel & kind regards,
Roland