The last two lines will not return anything. For all other letters of the Cyrillic alphabet, this is not the case.
This is an old discrepancy in the Ukrainian_100_CI_AS encoding and similar.
Perhaps in UTF8 it is worth changing the behavior as in SQL_Ukrainian_CP1251_CI_AS?
select serverproperty('Collation')
exec sp_helpsort
create table #x (
a varchar(10) collate SQL_Ukrainian_CP1251_CI_AS
, b varchar(10) collate Ukrainian_100_CI_AS_SC_UTF8
, c varchar(10) collate Ukrainian_100_CI_AS
)
declare @x varchar(2) = char(252) + char(252) --ьь
declare @y varchar(2) = char(252) + char(220) --ьЬ
select @x, @y
insert into #x select 'ьЬ', 'ьЬ', 'ьЬ'
select * from #x where a like '%ьь%'
select * from #x where b like '%ьь%'
select * from #x where c like '%ьь%'
drop table #x
------ RESULT:
--------------------SQL_Ukrainian_CP1251_CI_AS
(1 row affected)
Server default collation
--------------------
Ukrainian, case-insensitive, accent-sensitive, kanatype-insensitive, width-insensitive for Unicode Data, SQL Server Sort Order 108 on Code Page 1251 for non-Unicode Data
---- ----
ьь ьЬ
(1 row affected)
(1 row affected)
a b c
---------- ---------- ----------
ьЬ ьЬ ьЬ
(1 row affected)
a b c
---------- ---------- ----------
(0 rows affected)
a b c
---------- ---------- ----------
(0 rows affected)