Get your taxes done using TurboTax

I pay capital gains as long as the ETF appreciates?

Ex: I contribute $200,000 in an ETF. The value appreciates to $400,000 over time. Then I withdraw $100,000.

I still pay at capital gains even though I am still under my contribution amount?