Endoscopy is one of the most effective methods for diagnosing diseases in the upper GI tract. This paper proposes a unified encoder-decoder model for dealing with three tasks simultaneously: anatomical site classification, lesion classification, and lesion segmentation. In addition, the model can learn from a training set comprised of data from multiple sources. We report results on our own large dataset of 8207 images obtained during routine upper GI endoscopic examinations. Experiments show that our model performs admirably in terms of classification accuracy and yields competitive segmentation results compared to the single-task model with the same architecture.