Try this:
Insert Into Transactions (Name, PERIOD_COUNT, Act_Prime_Amt, Act_Avg_Amt)
SELECT Master.Name, lnPeriodCount,
CASE WHEN lnPeriodCount <= Master.Act_Prime_Pd THEN 0 ELSE Master.Act_Prime_Amt END,
CASE WHEN lnPeriodCount <= Master.Act_Avg_Pd THEN 0 ELSE Master.Act_Avg_Amt END
For further information, please see:
CASE (Transact-SQL)[
^]