You could use a tool called WMICode Creator to generate your code:
http://www.microsoft.com/en-us/download/details.aspx?id=8572
Here is a basic example of a SQL Alert to listen for CPU usage of 95%
SELECT * FROM __InstanceModificationEvent WITHIN 360
WHERE TargetInstance ISA 'Win32_Processor' AND TargetInstance.LoadPercentage > 95