Wilson loops: From 4D supersymmetric Yang-Mills theory to 2D Yang-Mills theory