Yes, Charan Shah you are right, MME selects SGW based on the position/eNodeB from where UE is trying to connect to network. There would be many factor while selecting a SGW for UE. I am not interested to explain that logic since it varies vendor to vendor. Specifications cover only message definition and about the signaling messages.
During the attach procedure when SGW sends "Create Session Response" to MME, it sends its tunnel ids to MME and MME forwards the same tunnel ids to eNodeB in "Initial Context Setup Request" message. eNodeB responds to MME by sending the "Initial Context Setup Response" message. This ICS response message carries eNodeB sides tunnel ids. MME retrieves these tunnel ids from ICS response and shares the same with SGW using the "Modify Bearer Request" message.
Hopefully my explanation will help you.