This is a very common "Newbie" mistake.
When you write a calculation that executes from the context of your parent record (Jobs) and it follows this form:
If ( Rules::Rule Code = "ITW" ; Do this if true ; do this if false )
The calculation only references the first related record. It thus evaluates as:
If ( "XYZ" = "ITW" ; Do this if true ; do this if false )
The calculation never even "sees" the other related records.
To do what you want will require either a different relationship or a completely different approach.
a) You could create two new Ocurrences of Jobs and link them by Job number AND by Rule Code. You'd set up two calculation fields with text results with the Strings "ITW" and "ITH" respectively as the additional match fields in Jobs.
b) you could write a script that pulls up the found set of related Rules records and then constrains the found set to just the one record, copies the value into a variable and then returns to Jobs to set the field with that value.
c) ExecuteSQL could return this value from Rules using both the Job Number and Rule Code in a simple WHERE clause.