INSERT INTO tbloptions_static (name, value, autoload) VALUES('local_pricing_credits_assigned', '0', 1);

INSERT INTO tbloptions (tenant_id, NAME, VALUE, autoload)
SELECT t.id,'local_pricing_credits_assigned',
(CASE WHEN (plans_id = 12 OR plans_id = 15) THEN '250' 
WHEN (plans_id = 10 OR plans_id = 11 OR plans_id = 14) THEN '25' 
ELSE '0' END ) AS credit_value ,1
FROM tbltenants t
LEFT JOIN tbltenant_plan_information tpi ON t.id = tpi.tenant_id
WHERE tpi.is_plan_expired = 0 ;