If you want the text which belongs to an error number (if that's the case), try:
select *
from master.sys.messages
where message_id = ####
(replace #### with the error number)
If you want to simulate an error, try the RAISERROR command
See BOL for more information about this table / RAISERROR
Wilfred
The best things in life are the simple things