There are nine instances where the prepositional phrase “כטוב” occurs in Scripture. In six instances the preposition occurs with the vowel patach, and in the other three instances the preposition occurs with the sh’wa.
Please click on the image below to enlarge.

What do we see? When the phrase “כטוב” occurs in Scripture with the patach under the kaph, the translation is comparable to “like” or “as.” However, when the phrase “כטוב” occurs in Scripture with the sh’wa under the kaph, the meaning carries an idea of temporal “when.” So the three verses with the sh’wa under the kaph appear as follows:
II Samuel 13:28 (Sefaria)
וַיְצַו֩ אַבְשָׁל֨וֹם אֶת־נְעָרָ֜יו לֵאמֹ֗ר רְא֣וּ נָ֠א כְּט֨וֹב לֵב־אַמְנ֤וֹן בַּיַּ֙יִן֙ וְאָמַרְתִּ֣י אֲלֵיכֶ֔ם הַכּ֧וּ אֶת־אַמְנ֛וֹן וַהֲמִתֶּ֥ם אֹת֖וֹ אַל־תִּירָ֑אוּ הֲל֗וֹא כִּ֤י אָֽנֹכִי֙ צִוִּ֣יתִי אֶתְכֶ֔ם חִזְק֖וּ וִהְי֥וּ לִבְנֵי־חָֽיִל׃
Now Absalom gave his attendants these orders: “Watch, and when Amnon is merry with wine and I tell you to strike down Amnon, kill him! Don’t be afraid, for it is I who give you the order. Act with determination, like brave men!”
.
Hosea 10:1 (Sefaria)
גֶּ֤פֶן בּוֹקֵק֙ יִשְׂרָאֵ֔ל פְּרִ֖י יְשַׁוֶּה־לּ֑וֹ כְּרֹ֣ב לְפִרְי֗וֹ הִרְבָּה֙ לַֽמִּזְבְּח֔וֹת כְּט֣וֹב לְאַרְצ֔וֹ הֵיטִ֖יבוּ מַצֵּבֽוֹת׃
Israel is a ravaged vine And its fruit is like it. When his fruit was plentiful, He made altars aplenty; When his land was bountiful, Cult pillars abounded.
NOTE: Please note that the preposition occurs twice in this verse with the same meaning.
.
Esther 1:10 (Sefaria)
בַּיּוֹם֙ הַשְּׁבִיעִ֔י כְּט֥וֹב לֵב־הַמֶּ֖לֶךְ בַּיָּ֑יִן אָמַ֡ר לִ֠מְהוּמָן בִּזְּתָ֨א חַרְבוֹנָ֜א בִּגְתָ֤א וַאֲבַגְתָא֙ זֵתַ֣ר וְכַרְכַּ֔ס שִׁבְעַת֙ הַסָּ֣רִיסִ֔ים הַמְשָׁ֣רְתִ֔ים אֶת־פְּנֵ֖י הַמֶּ֥לֶךְ אֲחַשְׁוֵרֽוֹשׁ׃
On the seventh day, when the king was merry with wine, he ordered Mehuman, Bizzetha, Harbona, Bigtha, Abagtha, Zethar, and Carcas, the seven eunuchs in attendance on King Ahasuerus,
In each of these verses, the sh’wa signals to the reader that this particular use of this preposition is not the usual meaning of “like” or “as,” but temporal, meaning “when.” Waltke and O’Connor (1990) allude to this nuance of the preposition kaph in their grammar.
SOURCE:
Waltke, B. K., & O’Connor, M. P. (1990). An Introduction to Biblical Hebrew Syntax. Winona Lake: Eisenbrauns, 255.