IF EXISTS(
SELECT 1 FROM MASTER.dbo.sysprocesses WHERE LEFT(program_name,8)= 'SQLAgent')
BEGIN
SELECT SERVERPROPERTY('ServerName') AS 'InstanceName',getdate() AS CurrentDate, 'Running' AS 'SQLServerAgent Status'
END
ELSE
BEGIN
SELECT SERVERPROPERTY('ServerName') AS 'InstanceName',getdate() AS CurrentDate, 'Stopped' AS 'SQLServerAgent Status'
END

Sample Output:

Read the rest