There are at least three different ways “ch” gets pronounced in English words and that tells you the origin of those words.

1. Latin-origin words used ch for tʃ/च sound. For example, “champion” or “channel”.
2. French-origin words used ch for ʃ/श sound. For example, “machine” or “champagne”.
3. German-origin words used ch for x/ख़ sound. For example, Erlich “Bachman” from the Silicon Valley show.