You may need to do this in a couple of places.
On the SubForm's On Format event, add this code:
Dim iCValue As Integer
Dim sDValue As String
iCValue = Me.C
Select Case iCValue
sDValue = "Case 0"
sDValue = "Case 1"
sDValue = "Case 2"
sDValue = "Case 3"
Me.D = sDValue
You may also want to add this code to the Before Insert and Before Update event of the subform as well.
Did that help? Do a search for "Select Case" on http://wrox.books24x7.com
and it will come up with 181 books that all discuss this. Use the Access 2003 VBA Programmer's Reference for a start.