You can't have your cake and eat it too.

鱼与熊掌不可兼得。