The electronic structure and the electric transport properties of the antiferromagnetic semiconductor Sr2IrO4 is demonstrated to be largely dependent on the direction of the atomic spins, thus giving rise to a significant anisotropic magnetoresistance. Integration of these antiferromagnetic semiconducting layers with ferromagnetic electrodes may lead to new magnetic memory concepts.