～したことがある means "have done" with the focus on the thing at issue having happened in the past or having a certain experience.
～することがある means "occasionally/sometimes do", focusing instead on the action being a possible occurrence.
For the grammar point, see, for example, this and this.
そこで泳ぐことがありますか means "Do you swim there?" or ...