Just want to make sure I've got your design down pat.
What you're looking at is a mixed-design wherein all of your participants provide data (X) at three measurements (pre, ret1, ret2), and your participants can be split on a variable (condition).
The way to examine this is Analyze > General Linear Model > Repeated Measures.
SPSS will then ask you to input your repeated variable. This is your three measurements. You will need to give it a name, and tell SPSS how many levels to expect (3). Once you click "Add", click on "Define" to tell it what your model actually looks like.
What you will get now is a new window that wants Within-Subjects Variables and Between-Subjects Factors.
Within-Subjects Variables is where your data (X) goes. You've told SPSS that you have three levels, so it expects three things: pre, ret1, and ret2.
The Between-Subjects Factor is where you tell SPSS how you want your data split. This is where you give it condition which will make it possible to see if there is a relationship between condition and pre/ret1/ret2.
Really important note: When you set up your variables, make sure you set the "Measure" for the different variables. Specifically, your condition variable needs to be set as "Nominal" (though SPSS should infer this).
As for comparing groups separately, SPSS has a really nice function which lets you split your data. To get this, select Data > Split File. Save your data file before doing this, just in case. Make sure to select "Compare groups", and move the variable you're interested in (condition, sex, whatever) into the box. Select "Sort the file by grouping variables". When it is done, the data window in SPSS should have "Split by condition" in the bottom right.
Now, when you re-run your ANOVA, SPSS will give you two sets of output. One for when condition = 1, and one where condition = 2. To undo this, you will need to go to Data > Split File and select "Analyze all cases, do not create groups" and hit "OK". If you don't do this, SPSS will just keep working with a split file.
When you say relationship between X, Y and/or Z this makes me think of Pearson's r, but only because you used the word relationship, and because I know nothing else about X, Y and Z.