You could use two new link tables and drop LinkId
from table A
AB (Aid, Bid)
AC (Aid, Cid)
Depends on your app though and the control you have over the inserting...
You don't have to use built in constraints - you can write custom ones with triggers of course if you wanted to keep that structure.
something like:
CREATE TRIGGER trigger_name ON A
FOR INSERT, UPDATE
AS
declare @err varchar(50)
select @err = case
when inserted.typeid = 1 and not exists(select 0 from B where id=inserted.linkid) then
@err = 'No link record exists in B.'
when inserted.typeid = 2 and not exists(select 0 from C where id=inserted.linkid) then
@err = 'No link record exists in C.'
else @err = null
end
from inserted
if @err is not null RAISERROR (@err, 16, 1 )