=IF(A1="shirt",3,"")

Change A1 to the cell you are referencing