If you get divorce before the green card interview you are no longer entitled to get a green card through your US Citizen Spouse. However, if you (or your child) were subject to Physical, Mental, Sexual or any other type of abuse by your US Citizen spouse, you may be entitled to file a Self Petition and apply for the green card yourself without the US Citizen Spouse knowledge or assistance, under the Violence Against Women Act, VAWA.
You should contact a US Immigration Lawyer in order to advise you whether you are eligible to file a self petition under the Violence Against Women Act, VAWA.
If you are separated and your US Citizen spouse agrees to come with you to the green card marriage interview, your green card application may still be approved, since the USCIS is looking at your intention when you got married. If you can prove that you and your US Citizen spouse got married in good faith you may still get your green card application approved despite the fact that you and your US Citizen Spouse are separated.