Since I just lost 25 pounds, mostly body fat, by swimming, I can tell you from my experience that you can. I have to mention that I've been swimming for more than 20 years and used to train in groups with a trainer and also use work outs. It depends mostly on the quality to get results. I swim at a gym too and most people in the pool don't really swim well nor particularity intensive. I do interval training which mans something like 4 x 200 yards hard, 10 x 100 yards fast, 10 x 25 yard sprints just to give you an idea. Obviously that is more effective than a stationary bike because you train your whole body At the moment I also do spinning classes and mix it up. Even doing spinning depends on how much quality training you do. If you cycle with a low resistance you'll get less out of it than cycling with a high resistance. It's he same with any form of exercise. I also needed to adjust my diet and watch what and how much I eat.